﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Che.Domain.Entity.Roleju
{
   public class FileInfo
    {
        public string OriginalFileName { get; }
        public string StoredFileName { get; }
        public string ContentType { get; }
        public long Size { get; }
        public string Path { get; }

        public FileInfo(string originalFileName, string storedFileName,
                      string contentType, long size, string path)
        {
            OriginalFileName = originalFileName;
            StoredFileName = storedFileName;
            ContentType = contentType;
            Size = size;
            Path = path;
        }

        public string GetFileExtension() =>
            OriginalFileName.Substring(OriginalFileName.LastIndexOf('.') + 1);
    }
}
